package com.wondream.myframework.trade.service.impl;

import com.alibaba.druid.support.json.JSONUtils;
import com.wondream.myframework.trade.service.CommonService;
import com.alibaba.dubbo.config.annotation.Service;
import com.wondream.myframework.trade.utils.WXPayRequest;

import java.util.Map;

@Service(version = "${dubbo.service.version}")
public class CommonServiceImpl implements CommonService {
    @Override
    public String testDubbo() {
        return "invoke function test success!";
    }

    @Override
    public Map<String, Object> profitSharing(String requestData) {
        Map<String, Object> dataMap = (Map<String, Object>)JSONUtils.parse(requestData);
        return WXPayRequest.profitSharing(dataMap);
    }
}
